package org.ucas.kgraph.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.ucas.kgraph.dao.DocFileDao;
import org.ucas.kgraph.dao.PermDao;
import org.ucas.kgraph.dao.SchemDao;
import org.ucas.kgraph.dto.GraphDto;
import org.ucas.kgraph.dto.ListDto;
import org.ucas.kgraph.entity.DocFile;
import org.ucas.kgraph.entity.Perm;
import org.ucas.kgraph.entity.Relation;
import org.ucas.kgraph.entity.RelationType;
import org.ucas.kgraph.entity.Role;
import org.ucas.kgraph.entity.Schem;
import org.ucas.kgraph.entity.Term;
import org.ucas.kgraph.entity.TermGraph;
import org.ucas.kgraph.utils.exception.BadRequestException;
import org.ucas.kgraph.utils.exception.ConflictException;
import org.ucas.kgraph.utils.exception.ForbiddenException;
import org.ucas.kgraph.utils.exception.NotFoundException;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;

@Transactional
@Service
public class DocFileService {

  @Autowired
  private DocFileDao docFileDao;
 
  public DocFile findById(Long id) {
  // TODO Auto-generated method stub
	return docFileDao.findOne(id);
  }

  public void save(DocFile docFile) {
	// TODO Auto-generated method stub
	docFileDao.save(docFile);
  }


  
}
